package self.hoy.demo.grainmall.ware.mapper;

import org.apache.ibatis.annotations.Param;
import self.hoy.demo.grainmall.ware.entity.WareSku;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import self.hoy.demo.grainmall.ware.vo.StockVo;

import java.util.List;

/**
 * 商品库存
 * 
 * @author Hoy
 * @email xxx@gmail.com
 * @date 2020-07-04 22:44:51
 */
@Mapper
public interface WareSkuMapper extends BaseMapper<WareSku> {

    void addStock(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("skuNum") Integer skuNum);

    List<StockVo> countStock(@Param("skuIds") List<Long> skuIds);
}
